package com.gwctv.mapper;

import com.gwctv.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * 将该程序标识为mapper层（数据持久层）
 */
@Mapper
public interface UserMapper {

    /**
     * 根据openid查询用户是否注册成功
     * @Select 用于查询用户信息
     * @param openid
     * @return
     */
    @Select("select * from user where openid = #{openid}")
    public User getByOpenid(String openid);

    /**
     * 插入user数据
     * @param user
     */
    public void insert(User user);
}
